import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.Buffer;

public class factorial {

	public static void main(String[] args) throws IOException {
		int n1;
		String frase = "";
		System.out.println("digite el numero para calcular su factorial");
		BufferedReader opcion = new BufferedReader(new InputStreamReader(
				System.in));
		frase = opcion.readLine();
		n1 = Integer.parseInt(frase);
		int r = f(n1);
		System.out.println(r);

	}

	public static int f(int n1) {

		if (n1 == 1) {
			return 1;
		} else {
			return n1 * (f(n1 - 1));
		}

	}

}
